package com.zoop.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zoop.model.About;
import com.zoop.service.AboutService;

@RestController
@RequestMapping(value="about")
public class AboutController {

	@Autowired
	private AboutService aboutService;
	
	@RequestMapping(value="/list")
	public List<About> list(){
		return aboutService.findAll();
	}
	
	@RequestMapping(value="/add")
	public void add(@RequestBody About about) {
		aboutService.save(about);
	}
	
}
